#!/bin/bash
docker rm -f mysql-backup
docker run -d --name mysql-backup \
 --link mysql5.7:mysql5.7 \
 -e SKIP_TABLES="skip_database1.skip_table1,skip_database2.skip_table2" \
 -e RETAIN_DAYS=20 \
 -e MYSQL_USER="root" \
 -e MYSQL_PASSWORD="password" \
 -e MYSQL_PORT="3306" \
 -e MYSQL_HOST="mysql5.7" \
 -e MYSQL_DATABASES="devops,skip_database1,skip_data" \
 -v /home/devops/mysql/backups:/backups \
harbor.com/devops/mysql/mysql-backup:v2